#pragma once
#include "AppConfig.h"
#include "RegisterAppInfo.h"
#include "faxUsbManager.h"
typedef AppConfig *(*PFNCreateAppConfigObject)();
typedef BOOL (*PFNInitAppRegisterInfo)();
typedef RegisterAppInfo* (*PFNCreateRegisterAppInfoObject)();
typedef BOOL (*PFNGetAppRegisterInfoByExePath)( char *exePath, RegisterAppInfo &info );
typedef BOOL (*PFNGetAppRegisterInfoByinstallPath)( char *installPath, RegisterAppInfo &info );
typedef BOOL (*PFNGetConfigBySerialNum)(char *serialNum, AppConfig &config);
typedef BOOL (*PFNIsOtherInstanceRunning)();
typedef CfaxUsbManager* (*PFNGetTaxUsbManager)();
typedef BOOL (*PFNGetPassword)(char* buffer, int bufferLen, BOOL super);
typedef VOID (*PFNShowProgress)();
typedef VOID (*PFNHideProgress)();


extern PFNCreateAppConfigObject pCreateAppConfigObject;
extern PFNInitAppRegisterInfo pInitAppRegisterInfo;
extern PFNCreateRegisterAppInfoObject pCreateRegisterAppInfoObject;
extern PFNGetAppRegisterInfoByExePath pGetAppRegisterInfoByExePath;
extern PFNGetAppRegisterInfoByinstallPath pGetAppRegisterInfoByinstallPath;
extern PFNGetConfigBySerialNum pGetConfigBySerialNum;
extern PFNIsOtherInstanceRunning pIsOtherInstanceRunning;
extern PFNGetTaxUsbManager pGetTaxUsbManager;
extern PFNGetPassword pGetPassword;
extern PFNShowProgress pShowProgress;
extern PFNHideProgress pHideProgress;

class DllWrapper
{
private:
	BOOL m_isInited;
	HMODULE m_hUsbManagerMod;
	HMODULE m_hUIMod;
public:
	DllWrapper(void);
	~DllWrapper(void);
	BOOL Init();
	void Release();
};

extern DllWrapper g_dllWrapper;
